<?php

/**
 * Rubros form.
 *
 * @package    tercermilenio
 * @subpackage form
 * @author     Your name here
 */
class RubrosForm extends BaseRubrosForm
{
  public function configure()
  {
  }

    public function setup()
  {
            parent::setup();
    
    $this->setWidgets(array(
      'rub_id'     => new sfWidgetFormInputHidden(),
      'rub_nombre' => new sfWidgetFormInput(),
      ));

    $this->setValidators(array(
      'rub_id'     => new sfValidatorPropelChoice(array('model' => 'Rubros', 'column' => 'rub_id', 'required' => false)),
      'rub_nombre' => new sfValidatorString(array('min_length' => 3,'max_length' => 100, 'required' => true)),
      ));

    $this->widgetSchema->setNameFormat('rubros[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

  }
}
